package com.witmore.neutron.ai.web.enums;

import lombok.Getter;

/**
 * Description: ShowFlagEnum
 * Author: 豆子高
 * Date: 2025/6/6 12:26
 */

@Getter
public enum ShowFlagEnum {

    //消息明细是否展示 0:不展示;1:展示
    NOT_SHOW(0, "不展示"),
    SHOW(1, "展示");

    private final Integer code;
    private final String desc;

    ShowFlagEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ShowFlagEnum fromCode(Integer code) {
        for (ShowFlagEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        throw new IllegalArgumentException("Invalid ShowFlagEnum code: " + code);
    }
}
